package com.atguigu.yygh.sta.controller;

import com.atguigu.yygh.common.result.R;
import com.atguigu.yygh.order.client.OrderFeignClient;
import com.atguigu.yygh.vo.order.OrderCountQueryVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @ClassName StatisticsController
 * @Description 此类描述:
 * @Author dangchen
 * @DateTime 2022-10-23 16:38
 * @Version 1.0
 */
@RestController
@RequestMapping("/admin/statistics")
public class StatisticsController {
    @Autowired
    private OrderFeignClient orderFeignClient;

    @GetMapping("getCountMap")
    public R getCountMap(OrderCountQueryVo orderCountQueryVo){
        Map<String,Object> map = orderFeignClient.getCountMap(orderCountQueryVo);
        return R.ok().data(map);
    }
}
